package com.healthy.assessment.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.assessment.mapper.UserHealthDataMapper;
import com.healthy.assessment.domain.UserHealthData;
import com.healthy.assessment.service.IUserHealthDataService;

/**
 * 健康数据Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class UserHealthDataServiceImpl implements IUserHealthDataService 
{
    @Autowired
    private UserHealthDataMapper userHealthDataMapper;

    /**
     * 查询健康数据
     * 
     * @param id 健康数据主键
     * @return 健康数据
     */
    @Override
    public UserHealthData selectUserHealthDataById(Integer id)
    {
        return userHealthDataMapper.selectUserHealthDataById(id);
    }

    /**
     * 查询健康数据列表
     * 
     * @param userHealthData 健康数据
     * @return 健康数据
     */
    @Override
    public List<UserHealthData> selectUserHealthDataList(UserHealthData userHealthData)
    {
        return userHealthDataMapper.selectUserHealthDataList(userHealthData);
    }

    /**
     * 新增健康数据
     * 
     * @param userHealthData 健康数据
     * @return 结果
     */
    @Override
    public int insertUserHealthData(UserHealthData userHealthData)
    {
        return userHealthDataMapper.insertUserHealthData(userHealthData);
    }

    /**
     * 修改健康数据
     * 
     * @param userHealthData 健康数据
     * @return 结果
     */
    @Override
    public int updateUserHealthData(UserHealthData userHealthData)
    {
        return userHealthDataMapper.updateUserHealthData(userHealthData);
    }

    /**
     * 批量删除健康数据
     * 
     * @param ids 需要删除的健康数据主键
     * @return 结果
     */
    @Override
    public int deleteUserHealthDataByIds(Integer[] ids)
    {
        return userHealthDataMapper.deleteUserHealthDataByIds(ids);
    }

    /**
     * 删除健康数据信息
     * 
     * @param id 健康数据主键
     * @return 结果
     */
    @Override
    public int deleteUserHealthDataById(Integer id)
    {
        return userHealthDataMapper.deleteUserHealthDataById(id);
    }
}
